package com.tqw.item.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tqw.pojo.Area;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @description: some desc
 * @author: Administrator
 * @date: 2022/4/12 11:26
 */
@Mapper
public interface AreaMapper extends BaseMapper<Area> {

    @Select("select id from area where id=(select parent_id from area where id=#{addressId})")
    Integer findthree(Integer addressId);

    @Select("select id,name from area where id=(select parent_id from area where id=#{areathree})")
    Area findtwo(Integer areathree);

    @Select("select id,name from area where id=(select parent_id from area where id=#{areatwo})")
    Area findone(Integer id);
}
